import 'package:flutter/material.dart';

import '../../../common/system_config.dart';
import '../../../utils/tools/screenutil_tool.dart';
import '../../../utils/widget/concreteicon_widget.dart';

/// ### 底部加载状态描述
/// #### [title] String|必填|状态描述文案
/// #### [isLoadComponent] bool|选填|是否正在加载
class LoadStateDesc extends StatelessWidget {
  String title;
  bool isLoadComponent;

  LoadStateDesc(String title, {bool isLoadComponent: false}) {
    this.title = title;
    this.isLoadComponent = isLoadComponent;
  }

  @override
  Widget build(BuildContext context) {
    return this.isLoadComponent ? Container(
      alignment: Alignment.center,
      height: ST.seth(90),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          CW.circle(color: SystemConfig.grayColor, size: ST.setsp(50)),
          SizedBox(width: ST.setw(10)),
          Text(
            title,
            style: TextStyle(
              fontSize: ST.setsp(30),
              color: SystemConfig.grayColor
            ),
          ),
        ],
      ),
    ) : Container(
      height: ST.seth(90),
      alignment: Alignment.center,
      child: Text(
        title,
        style: TextStyle(
          fontSize: ST.setsp(30),
          color: SystemConfig.grayColor
        ),
      ),
    );
  }

}